﻿using System;
namespace Xtee.Schema {
    
    
    public class XsdToken : global::Xtee.Schema.XsdNormalizedString {
        
        public XsdToken(string value) : 
                base(value) {
            this.Validate();
        }
        
        public XsdToken() : 
                base(string.Empty) {
        }
        
        public static bool TryParse(string value, out global::Xtee.Schema.XsdToken result) {
            try {
                result = new global::Xtee.Schema.XsdToken(value);
                return true;
            }
            catch (System.Exception ex) {
                result = null;
                return false;
            }
        }
        
        public static implicit operator String (XsdToken value) {
            return value.Value;
        }
        
        public static implicit operator XsdToken (string value) {
            return new XsdToken(value);
        }
    }
}
